﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MyWeb.Business;
using MyWeb.Common;
using MyWeb.Data;

public partial class MinaServices_Roles_ThemQuyen : System.Web.UI.Page
{
    tblROLESInfo roles = new tblROLESInfo();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void lblUpdate_Click(object sender, EventArgs e)
    {
        #region[TestInput]
        if (txtRoleName.Text.Trim().Equals(""))
        {
            WebMsgBox.Show("Bạn chưa nhập Tên Quyền!");
            txtRoleName.Focus();
            return;
        }
        #endregion
        try
        {
            roles.ROLENAME = txtRoleName.Text;
            tblROLESService.tblROLES_Insert(roles);
            Response.Redirect("~/MinaServices/Roles/DanhSachQuyen.aspx");
        }
        catch (Exception)
        {

            WebMsgBox.Show("Insert Error!");
        }
    }
}